<template>
	<div>
		<el-form ref="form" :model="form.addProductInfo" :rules="rules.addProductInfo" label-width="100px">
            <el-form-item label="企业名称" prop="name">
                <el-input v-model="form.addProductInfo.name"></el-input>
            </el-form-item>

            <el-form-item label="主要技术路径" prop="techRoute">
                <el-select v-model="form.addProductInfo.techRoute" multiple placeholder="请选择" style="width:100%">
                    <el-option v-for="item in initData.techRoute" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                </el-select>
            </el-form-item>
			
			<el-form-item label="领域" prop="domain">
                <el-select v-model="form.addProductInfo.domain" multiple placeholder="请选择" style="width:100%">
                    <el-option v-for="item in initData.domain" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="总体描述">
                <script id="editor" type="text/plain"></script>
            </el-form-item>
        </el-form>

	</div>
</template>


<script>

export default{
	data(){
		return {
			form:{
				addProductInfo:{
					name:'',
					techRoute:[],
					domain:[],
					content:'',
				}
			},
			rules:{
				addProductInfo:{
					name:[
						{required:true,message:'请输入企业名称',trigger:'blur'},
					],
					techRoute:[
						{type:'array',required:true,message:'请至少选择一个领域',trigger:'change'},
					],
					domain:[
						{type:'array',required:true,message:'请至少选择一个领域',trigger:'change'},
					]
				}
			},
			initData:{
				techRoute:[],
				domain:[]
			},
            editor: null,
		}
	},
	mounted(){
        this.editor = UE.getEditor('editor');
    },
    destroyed() {
        this.editor.destroy();
    },
}	
</script>
 No newline at end of file
